package com.vilen.weixin.web.servlet;

import com.vilen.weixin.json.AccessToken;

/**
 * Created by Administrator on 2016/2/14.
 * 单例模式 geterseter不需要wc
 */
public class WeixinContext {
    private String appId;
    private String appSecret;
    private String baseUrl;
    private String token;
    private AccessToken accessToken;
    private static WeixinContext wc;

    private WeixinContext() {

    }
    public static WeixinContext getInstance() {
        if(wc==null) {
            wc = new WeixinContext();
        }
        return wc;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getBaseUrl() {
        return baseUrl;
    }

    public void setBaseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public AccessToken getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(AccessToken accessToken) {
        this.accessToken = accessToken;
    }

    public static WeixinContext getWc() {
        return wc;
    }

    public static void setWc(WeixinContext wc) {
        WeixinContext.wc = wc;
    }
}
